package com.itheima.TestEmployee;

import java.util.Arrays;

public class TestMain {
    public static void main(String[] args) {
        Employee employee1 = new Employee(33,001);
        Employee employee2 = new Employee(3222,002);
        Employee[] employees = new Employee[2];
        employees[0] = employee1;
        employees[1] = employee2;


        System.out.println("之前："+ employees[0].toString()+ "     " + employees[1].toString());

        swap(employees);

        System.out.println("之后："+ employees[0].toString()+ "     " + employees[1].toString());




//        swap(44,22);


    }

    public static  void swap(Employee employees[]){
       Employee temp = employees[0];
       employees[0] = employees[1];
       employees[1] = temp;

    }
}
